#include<stdio.h>
int main()
{ 
  int k=1;
  int i,n,t;
  float e=1;
  scanf("%d",&n);
  do
  {  t=1;
     for(i=1;i<=k;i++)// 
     t=t*i;
     e=e+1.0/t;
     k++;
  } while(k<=n);
  printf("%0.5f",e);
  return 0;
  	
}
